﻿using System;
using System.Collections.Generic;
using System.Text;

/// <summary>
/// 战斗状态
/// </summary>
public class BattleState:ISceneState
{
    // 初始化
    public BattleState(SceneStateController controller):base("03BattleScene",controller)
    {}
   
    // 进入状态时调用
    public override void StateStart()
    {
        GameFacade.Insance.Init();
    }
    
    // 结束状态时调用
    public override void StateEnd()
    {
        GameFacade.Insance.Release();
    }
    
    // 更新时调用
    public override void StateUpdate()
    {
        // 游戏结束，返回主菜单
        if (GameFacade.Insance.isGameOver)
        {
            mController.SetState(new MainMenuState(mController));
        }

        GameFacade.Insance.Update();
    }
}

